#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "tyr_menu\fn_addItem.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_id","_params"];
_id = -1;

if (typename _this == typename [] && {count _this > 1}) then {
	if (isNil QGVAR(added_items)) then { GVAR(added_items) = []; };
	_id = count GVAR(added_items);
	GVAR(added_items) set [_id, _this];
} else {
	ERROR_1("Invalid input",_this);
};

TRACE_1("End",_id);
TMFPROFILERSTOP;
_id
